package com.sykj.why.mongo.document;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;

import java.io.Serializable;

/**
 * @author glory
 * @ClassName BaseDocument
 * @Description 公共参数类
 * @date 16/05/10
 */

@Getter
@Setter
public abstract class BaseDocument implements Serializable {

	private static final long serialVersionUID = 4275307253069991338L;
	@JsonIgnore
	private boolean removed = false;
	@Id
	private String id;
	/** * 创建时间 */
	private long createTime;
	/** * 更新时间 */
	private long updateTime;
	/** * 排序 */
	private int sort;
	/** * 是否可用 */
	private boolean enable=true;
	/** * 置顶状态 */
	private long isTop;
	/**
	 * 删除标记。true为已删除，false为未删除 请在查询时判断该字段
	 */
	public boolean getRemoved() {
		return removed;
	}
 }
